package com.yu.blog.entities.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yu.blog.entities.baseEntity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.validation.annotation.Validated;
import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@Validated
@TableName("p_admin_role")
public class AdminRole  extends BaseEntity implements Serializable {
    @Schema(description = "用户ID")
    @TableField("admin_id")
    @NotBlank(message = "用户ID不能为空")
    private Long adminId;
    @Schema(description = "角色ID")
    @TableField("role_id")
    @NotBlank(message = "角色ID不能为空")
    private Long roleId;
}
